<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <title>打卡规则管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="icon" th:href="@{/static/console/common/images/favicon.ico}">
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/element/index.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/static/console/css/sale/client.css?version=202406240854}"/>
</head>

<body>
<div id="container">
    <el-container>
        <el-header>
            <el-input v-model="search.searchVal" placeholder="用户名称" clearable></el-input>
            <el-button type="success" icon="el-icon-search" @click="loadWhiteUser">查询</el-button>
            <el-button type="primary" icon="el-icon-plus" @click="showDialog(0,null)">添加</el-button>
        </el-header>
        <el-main>
            <template>
                <el-table :data="whiteUserList" border v-loading="tableLoading" max-height="750">
                    <el-table-column
                            label="序号"
                            show-overflow-tooltip
                            type="index"
                            width="50"></el-table-column>
                    <el-table-column
                            label="用户ID"
                            show-overflow-tooltip
                            prop="userId"
                            width="100"></el-table-column>
                    <el-table-column
                            prop="userName"
                            label="用户名"
                            width="240" show-overflow-tooltip></el-table-column>
                    <el-table-column
                            label="操作"
                            width="180">
                        <template slot-scope="scope">
                            <!--<el-button @click="showDialog(1,scope.row)">
                                修改
                            </el-button>-->
                            <el-button @click="deleteWhiteUser(scope.row)" type="danger">
                                删除
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-pagination background
                               @size-change="handleSizeChange"
                               @current-change="handleCurrentChange"
                               :page-sizes="[50, 100, 200,500]"
                               :page-size="search.limit"
                               :current-page.sync="search.pageIndex"
                               layout="total,sizes, prev, pager, next"
                               :total="search.total">
                </el-pagination>
            </template>
            <template>
                <!--表单操作  -->
                <el-dialog :title="whiteUserDialog.title" :visible.sync="whiteUserDialog.show" width="600px"
                           v-loading="whiteUserDialog.loading" center>
                    <el-form ref="whiteUserForm" :model="whiteUserForm" :rules="whiteUserFormRules" label-width="80px">

                        <el-form-item label="备注:">
                            <el-input v-model="whiteUserForm.remarks" placeholder="请输入内容"></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" @click="onSubmit('whiteUserForm')">保存</el-button>
                        <el-button @click="whiteUserDialog.show = false">取消</el-button>
                    </div>
                </el-dialog>
            </template>
        </el-main>
    </el-container>
</div>
</body>
<script type="text/javascript" th:src="@{/static/console/assets/js/jquery-3.2.1.min.js}"></script>
<script type="text/javascript" th:src="@{/static/console/js/pages/base.js}" charset="utf-8"></script>
<script type="text/javascript" th:src="@{/static/js/vue.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/element/index.js}"></script>
<script type="text/javascript" th:src="@{/static/console/js/pages/sale/client.js?version=202211210941}"
        charset="utf-8"></script>

</html>